

use  "apr replication study 2.dta"



graph bar demswinbi demsdont demsnotsure, over(pid3new) aspect(1) graphregion(fcolor(white))



regr lawtot demswinbi c.ideo5 c.age_bin ib7.race i.gender c.educ c.faminc_new [pweight=weight] if democrat==1
coefplot, drop(_cons) aspect(1) graphregion(fcolor(white)) xlabel(,notick) ylabel(,labsize(small) notick)  xline(0, lwidth(medium) lcolor(black) lpattern(solid)) coeflabels(demswinbi = "Believe Dems. Win") title("A. Democrats", span size(*.9) linegap(1.5) margin(medium)) 

graph save demlaws, replace

regr lawtot demswinbi c.ideo5 c.age_bin ib7.race i.gender c.educ c.faminc_new [pweight=weight] if democrat==0
coefplot, drop(_cons) aspect(1) graphregion(fcolor(white)) xlabel(,notick) ylabel(,labsize(small) notick)  xline(0, lwidth(medium) lcolor(black) lpattern(solid)) coeflabels(demswinbi = "Believe Dems. Win") title("B. Republicans", span size(*.9) linegap(1.5) margin(medium)) 

graph save replaws, replace

gr combine demlaws.gph replaws.gph, col(1) iscale(1) graphregion (fcolor(white))
graph save alllaws, replace

